/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package researchgrants.parts.GrantRequest.grantOfficer;

import java.util.List;
import researchgrants.parts.LoggedData.panels.lists.*;
import java.util.Iterator;
import java.util.SortedMap;
import java.util.TreeMap;

/**
 * A set of panels to view and edit GrantOfficer
 * LoggedDataPanelsList will provide the panels provided that LoggedDataPanelsListGrantOfficer will provide the population of the list within the edit panel
 * @author DOStudent1
 */
public class LoggedDataPanelsListGrantOfficer extends LoggedDataPanelsList {
    public SortedMap<String, String> getListMap() {
        SortedMap<String, String> grantOfficers=new TreeMap<String, String>();
        List<GrantOfficer> allGrantOfficers = GrantOfficer.getAllGrantOfficers();
        for (Iterator<GrantOfficer> it = allGrantOfficers.iterator(); it.hasNext();) {
            GrantOfficer grantOfficer = it.next();
            grantOfficers.put(grantOfficer.toListId(), grantOfficer.toListValue());
        }
        return grantOfficers;
    }
}
